home *** CD-ROM | disk | FTP | other *** search
/ CD Loisirs 24 / CDL24.iso / LAPLACE / IDEM.DXR / Script_4_Slimy Movements.ls < prev    next >
Encoding:
Text File  |  1996-10-10  |  2.0 KB  |  83 lines

  1. on enterFrame
  2.   global gExFrame
  3.   set the member of sprite 1 to member "BUBBLE.MOV"
  4.   set the locH of sprite 1 to -319
  5.   set the locV of sprite 1 to -239
  6.   updateStage()
  7.   set the movieTime of sprite 1 to gExFrame
  8.   updateStage()
  9.   set the locH of sprite 1 to 320
  10.   set the locV of sprite 1 to 240
  11.   updateStage()
  12. end
  13.  
  14. on exitFrame
  15.   global gLow, gExFrame
  16.   unLoad()
  17.   set L to the stopTime of sprite 1
  18.   set MaxSpeed to L / 200
  19.   set F to L / 5
  20.   set R to L / 640.0
  21.   set ExMouse to the mouseH
  22.   if the mouseH > 0 then
  23.     if the mouseH < 640 then
  24.       set WhereTo to the mouseH * R
  25.       set WhereTo to integer(WhereTo)
  26.     else
  27.       set WhereTo to L
  28.     end if
  29.   else
  30.     set WhereTo to 0
  31.   end if
  32.   set UnPanneau to (WhereTo + (F / 2)) / F
  33.   startTimer()
  34.   set ExTimer to the timer
  35.   repeat while the mouseUp
  36.     if the mouseH > 0 then
  37.       if the mouseH < 640 then
  38.         set WhereTo to the mouseH * R
  39.         set WhereTo to integer(WhereTo)
  40.       else
  41.         set WhereTo to L
  42.       end if
  43.     else
  44.       set WhereTo to 0
  45.     end if
  46.     set UnPanneau to (WhereTo + (F / 2)) / F
  47.     if not gLow then
  48.       if abs(the mouseH - ExMouse) > 1 then
  49.         set ExMouse to the mouseH
  50.       else
  51.         set WhereTo to UnPanneau * F
  52.       end if
  53.       if abs(the movieTime of sprite 1 - WhereTo) > ((the timer - ExTimer) * 3) then
  54.         if WhereTo > the movieTime of sprite 1 then
  55.           set TheFrame to the movieTime of sprite 1 + ((the timer - ExTimer) * MaxSpeed)
  56.         else
  57.           set TheFrame to the movieTime of sprite 1 - ((the timer - ExTimer) * MaxSpeed)
  58.         end if
  59.       else
  60.         set TheFrame to WhereTo
  61.       end if
  62.       set ExTimer to the timer - 1
  63.       if TheFrame > L then
  64.         set TheFrame to L
  65.       else
  66.         if TheFrame < 0 then
  67.           set TheFrame to 0
  68.         end if
  69.       end if
  70.     else
  71.       set TheFrame to UnPanneau * F
  72.     end if
  73.     set the movieTime of sprite 1 to TheFrame
  74.     updateStage()
  75.   end repeat
  76.   cursor(-1)
  77.   updateStage()
  78.   Kill()
  79.   set gExFrame to UnPanneau * F
  80.   set ParLa to "Panneau" && UnPanneau
  81.   go(ParLa)
  82. end
  83.